package com.vma.interfaceShoes.controller;

import com.jfinal.core.Controller;
import com.jfinal.kit.HttpKit;
import com.vma.interfaceShoes.util.ReturnsUtil;
import com.vma.suggestion.service.SuggestionService;
import net.sf.json.JSONObject;

/**
 * Created by chenzui on 2017/5/6.
 */
public class SuggestionController extends Controller {
    /**
     * 查询专场下商品信息，包含是否收藏
     */
    public void addUserSuggestion(){
        try {
            Integer userId = getParaToInt("userId");
            String content = getPara("content");
            SuggestionService.addSuggestion(userId,content);
            renderJson(ReturnsUtil.returnSuccess("添加成功"));
        }catch (Exception e){
            e.printStackTrace();
            renderJson(ReturnsUtil.returnException(e.getMessage(),e));
        }

    }
}
